package com.oracle.oa.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;




@Entity                        
@Table(name="mynote")
public class Mynote  implements java.io.Serializable {


	 @GenericGenerator(name = "generator", strategy = "increment")
	 @Id
	 @GeneratedValue(generator = "generator")
	 @Column(name = "noteid", unique = true, nullable = false)   
     private int noteid;
	 @ManyToOne
 	 @JoinColumn(name = "userinfo_id")
     private Userinfo userinfo;
     @Column(name = "notetitle", length = 64)
     private String notetitle;
     @Column(name = "notecontent", length = 64)
     private String notecontent;
     @Column(name = "createtime", length = 64)
     private String createtime;


    // Constructors

    /** default constructor */
    public Mynote() {
    }

	/** minimal constructor */
    public Mynote(Userinfo userinfo, String notetitle, String createtime) {
        this.userinfo = userinfo;
        this.notetitle = notetitle;
        this.createtime = createtime;
    }
    
    /** full constructor */
    public Mynote(Userinfo userinfo, String notetitle, String notecontent, String createtime) {
        this.userinfo = userinfo;
        this.notetitle = notetitle;
        this.notecontent = notecontent;
        this.createtime = createtime;
    }

   
    // Property accessors

    public Userinfo getUserinfo() {
        return this.userinfo;
    }
    
    public int getNoteid() {
		return noteid;
	}

	public void setNoteid(int noteid) {
		this.noteid = noteid;
	}

	public void setUserinfo(Userinfo userinfo) {
        this.userinfo = userinfo;
    }

    public String getNotetitle() {
        return this.notetitle;
    }
    
    public void setNotetitle(String notetitle) {
        this.notetitle = notetitle;
    }

    public String getNotecontent() {
        return this.notecontent;
    }
    
    public void setNotecontent(String notecontent) {
        this.notecontent = notecontent;
    }

    public String getCreatetime() {
        return this.createtime;
    }
    
    public void setCreatetime(String createtime) {
        this.createtime = createtime;
    }
   








}